let createConfig;
try {
	createConfig = require("uni-config-center")
} catch (e) {}
export function getConfig(file, key) {
    if(!file) {
        return false
    }

    let uniConfig = createConfig && createConfig({
	    pluginId: 'uni-stat'
	})

    if(!uniConfig.hasFile(file + '.json')) {
        return false
    }

    let config = uniConfig.requireFile(file)

    return key ? config[key] : config
}